import axios from "../untils/axios"
import { Dispatch } from "redux"

export let get_list=()=>{
    return async(dispatch:Dispatch)=>{
        let {data}=await axios.get("/api/list")
        dispatch({
            type:'GET_LIST',
            payload:data.list
        })
    }
}
export let check_children=(key:number)=>{
    return{
        type:"CHILDREN_DATA",
        payload:key
    }
}